<?php

namespace seecms\lib\builder\column;

class BadgeColumn extends Column
{
    protected $template = 'badge';

    /**
     * @param $value
     * @param $bg
     * @param $text
     * @return $this
     */
    public function setStyle($value, $bg, $text): BadgeColumn
    {
        $this->extra[] = (compact('value', 'bg', 'text'));

        return $this;
    }

    /**
     * @param $value
     * @param $text
     * @return $this
     */
    public function green($value, $text): BadgeColumn
    {
        return $this->setStyle($value, 'green', $text);
    }

    /**
     * @param $value
     * @param $text
     * @return $this
     */
    public function blue($value, $text): BadgeColumn
    {
        return $this->setStyle($value, 'blue', $text);
    }

    /**
     * @param $value
     * @param $text
     * @return $this
     */
    public function black($value, $text): BadgeColumn
    {
        return $this->setStyle($value, 'black', $text);
    }

    /**
     * @param $value
     * @param $text
     * @return $this
     */
    public function cyan($value, $text): BadgeColumn
    {
        return $this->setStyle($value, 'cyan', $text);
    }

    /**
     * @param $value
     * @param $text
     * @return $this
     */
    public function gray($value, $text): BadgeColumn
    {
        return $this->setStyle($value, 'gray', $text);
    }
}